1. Field of the Invention
The present invention relates to pattern recognition in which an input image is compared with a multiplicity of predetermined reference patterns.
2. Description of the Prior Art
In pattern recognition, an image read by an image reading apparatus is processed to determine the position, attitude, shape and other such geometric features of an object. With pattern recognition capability becoming an essential part of visual systems in the areas of robotics and computer vision.
Pattern matching is a fundamental technique in the practical implementation of pattern recognition systems. It involves comparing an input image pattern with a multiplicity of preset reference patterns and selecting the reference pattern which is the closest match to the input image.
This selection of the reference pattern which offers the closest match is based on an evaluation parameter. This parameter is obtained by computing the degree of the correlation existing between the input image pattern and the reference pattern. The larger the number of matched pixels, or the smaller the number of unmatched pixels, the larger this correlation value becomes. Therefore, even if there is a reference pattern that is the same as the input image pattern, any relative positional shift between the two patterns will give rise to a decrease in the number of matched pixels, or ar increase in the number of unmatched pixels, and hence a decrease in the value of the evaluation parameter, i.e., the correlation value. The end result of this is the execution of erroneous recognition in which the two patterns are judged to be the same.
Various methods have been proposed to prevent this recognition error. Representative of such methods is one in which the input image pattern is compared with the reference patterns, and if they do not match the input image is incrementally shifted vertically and horizontally to other positions and the correlation between input image pattern and reference pattern is again obtained, the maximum value thus obtained being used as the correlation value of the input image and reference pattern. A drawback with this method is the large number of calculations it requires, which adds considerably to the time required to effect the recognition.
To ensure accurate detection of the position of the input image pattern, prior to obtaining the correlation value positional information on the input image pattern may be acquired using information such as pattern contour and center, and this information used to optimize the position of the input image pattern. However, one problem with this method is that it requires that the position of the input image be detected, which makes it difficult to apply to high-speed recognition. A further problem is that a positional detection section becomes an essential element of the pattern recognition apparatus, which increases the complexity and cost of the system.